package com.work.demo.hash;

import com.work.demo.entity.Book;

import java.util.HashMap;

/**
 * @ClassName : HashCodeTest
 * @Description : hashCode方法示例
 * @Author : LinYa
 * @Date: 2021/11/8  13:45
 */
public class HashCodeTest {

	public static void main(String[] args) {

		System.out.println(new Book("23", "332").hashCode());
		System.out.println(new Book("23", "332").hashCode());

		HashMap hm = new HashMap();

		hm.hashCode();

		String str = "123";
		String str1 = "123";

		System.out.println(new Book() == new Book());
		System.out.println(str == str1);

//		System.out.println(new Book().equals(new Book()));

	}
}
